<?php

namespace App\Http\Requests;

use App\Http\Requests\Request;

class ZhongzhiRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //定义规则
            'uname' => 'required|max:80',
            'password' => 'required|numeric|min:0.1',
        ];
    }
    public function messages()
    {
        return [
            //错误信息
            'uname.required' => '用户名不能为空',
            'uname.max' => '用户名太长',
            'password.required' => '密码不能为空',
        ];
    }
}
